<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style type="text/css">	
	div {
		width: 200px;
		height: 200px;
		background: red;
	}
	
	</style>
</head>
<body>
	<div></div>
	<script type="text/javascript">
		var div = document.getElementsByTagName('div')[0];
		document.onclick = function () {
			console.log('闲的');
		}
		div.addEventListener('click',function (e) {
			e.stopPropagation();
			this.style.background = "green";
		},false);


	</script>
</body>
</html>